package com.app.service.impl;

import com.app.mapper.OrderMapper;
import com.app.pojo.Item;
import com.app.pojo.Order;
import com.app.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    OrderMapper orderMapper;

    @Override
    public void add(Order order) {
        orderMapper.insert(order);
    }

    @Override
    public List<Order> list(int user_id) {
        return orderMapper.list(user_id);
    }

    @Override
    public List<Order> list2(int order_id) {
        return orderMapper.list2(order_id);
    }

    @Override
    public int select(int order_id) {
        return orderMapper.select(order_id);
    }

    @Override
    public void delete(int order_id) { orderMapper.delete(order_id);}

    @Override
    public void update(Order order) {
        orderMapper.update(order);
    }

    @Override
    public List<Order> selectAll() {
        return orderMapper.selectAll();
    }
}
